
from rest_framework import viewsets

from .models import CustomUser
from .serializers import CustomUserSerializer


class CustomUserViewSet(viewsets.ModelViewSet):
    '''
    list: 查询所有CustomUser
    create: 新增CustomUser
    retrieve: 查询单个CustomUser, 文档名: read,接口名: retrieve
    update: 更新CustomUser
    destroy: 删除CustomUser
    '''
    queryset = CustomUser.objects.all()
    serializer_class = CustomUserSerializer

